<template>
  <div class="register_container">
    <LoginAndRegisterPage>
      <TeacherRegister @changeToStudent="changes" v-show="scene === 1"></TeacherRegister>
      <StudentRegister @changeToTeacher="changes" v-show="scene === 2"></StudentRegister>
    </LoginAndRegisterPage>
  </div>
</template>
<script>
import LoginAndRegisterPage from '../../components/Login.vue'
import StudentRegister from './student/index.vue'
import TeacherRegister from './teacher/index.vue'
export default {
  name: 'registerPage',
  data() {
    return {
      //场景 教师注册|学生注册
      scene: 1
    }
  },
  methods: {
    changes(scene) {
      this.scene = scene
    }
  },
  components: {
    LoginAndRegisterPage,
    StudentRegister,
    TeacherRegister
  }
}

</script>
<style scoped>
.register_container {
  background-color: #f8f9fa;
  height: 100%;
}
</style>
